package com.itheima.proxydemo2;

import java.util.Arrays;

public class Test {

    public static void main(String[] args) throws Exception {

        //1.创建用户业务对象
        //UserService userService = new UserServiceImpl();
        UserService userService = ProxyUtil.createProxy(new UserServiceImpl());
        //2.调用用户业务的功能
        userService.login("admin", "123456");

        String[] names = userService.findUsers();
        System.out.println("查询到的用户为：" + Arrays.toString(names));

        String[] names1 = userService.findUsers1();
        System.out.println("查询到的用户为：" + Arrays.toString(names1));

        userService.deleteUsers();

    }
}
